/**
 * 商户维护
 * @constructor
 */
function Personal() {
}
var userId=0;
Personal.init = function () {
//获取顶部数据
    getMobileLimitData();

}
function getMobileLimitData () {
    $.ajax({
        url: "/sysConfig/getUserInfo",
        type: "get",
        contentType: "application/json",
        dataType: "json",
        success: function (data) {
           // console.log(data);
            userId=data.userId;
            $("#lab_userName").html(data.userName);
            $("#lab_userPhone").html(data.phone);
            $("#lab_secret").html(data.secret);

            $("#text_UserName").val(data.userName);
            $("#text_UserPhone").val(data.phone);


        },
        error: function () {
            // alert("Error");
        }
    });
}

// 关闭弹框， 获取输入值，然后执行逻辑
$("#createFileSureBut").click(function (){
    $("#createFileMModal").modal("hide");
    //创建传递的参数
    var postdata = {
        action:"person",
        userName:$("#text_UserName").val(),
        userPhone: $("#text_UserPhone").val(),
        userPassword: $("#text_UserPassword").val(),
        userNewPassword: $("#text_NewUserPassword").val(),
    };
    $.ajax({
        url: "/sysConfig/action",
        type:"post",
        data:JSON.stringify(postdata),
        contentType:"application/json",
        dataType:"json",
        success: function (data) {
            swal("操作成功!", "请继续操作", "success");
            getMobileLimitData();
        },
        error: function () {
            // alert("Error");
        }
    });


});
function changeUser(){
   // $("#createFileTitle").text(title);
    $('#createFileMModal').modal('show');
    //ShowCreateModal("修改最大阈值");
   // $("#ValueMaxNum").val(mobileLimit);
}


